package pres.lnk.spring_boot_starter_hello;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Spring自动配置
 * 注解@ConfigurationProperties指定类为属性配置类
 * prefix指定在application.properties中配置属性名的前缀，本例是hello.xxx
 * @author linnankun
 * @date 2017年4月7日
 */
@ConfigurationProperties(prefix="hello")
public class HelloServiceProperties {
	private static final String MSG = "world";
	private String msg = MSG;	//可通过holle.msg配置，默认为world
	public String getMsg() {
		return msg;
	}
	
	public void setMsg(String msg) {
		this.msg = msg;
	}
	
	
}
